package com.greenant.store.bean;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVObject;
import com.avos.avoscloud.AVRelation;

@AVClassName(AntAVObject.CLASS_GOODS_SYTLES_BASE)
public class AntGoodsStylesBase extends AntAVObject {
	
	public static final String ATTR_NAME ="name";
	public static final String ATTR_NUM_PER_LIST ="numPerStyle";
	public static final String ATTR_RELATION ="list";
	
	public String getName()
	{
		return this.getString(ATTR_NAME);
	}
	public void setName(String name)
	{
		this.put(ATTR_NAME,name);
	}
	
	public int getCount()
	{
		return Integer.parseInt(this.getString(ATTR_NUM_PER_LIST));
	}
	public void setCount(int count)
	{
		this.put(ATTR_NUM_PER_LIST,count);
	}
	
	public AVRelation<AntGoods> getRelation()
	{
		return this.getRelation(ATTR_RELATION);
	}
	public void removeFromRelation(AntGoods goods)
	{		
		this.getRelation(ATTR_RELATION).remove(goods);
	}
	
}
